#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
zephyr_library()
zephyr_library_sources(
	src/nrf_cloud_codec_internal.c
	src/nrf_cloud_log.c
	src/nrf_cloud_codec.c
	src/nrf_cloud_mem.c
	src/nrf_cloud_client_id.c
	src/nrf_cloud_fota_common.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_ALERT
	src/nrf_cloud_alert.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_LOG_BACKEND
	src/nrf_cloud_log_backend.c)
zephyr_library_sources_ifdef(
	CONFIG_MODEM_JWT
	src/nrf_cloud_jwt.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_MQTT
	src/nrf_cloud.c
	src/nrf_cloud_fsm.c
	src/nrf_cloud_transport.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_AGNSS
	src/nrf_cloud_agnss.c
	src/nrf_cloud_agnss_utils.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_PGPS
	src/nrf_cloud_agnss.c
	src/nrf_cloud_agnss_utils.c
	src/nrf_cloud_pgps.c
	src/nrf_cloud_pgps_utils.c
	src/nrf_cloud_download.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_LOCATION
	src/nrf_cloud_location.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_FOTA
	src/nrf_cloud_fota.c
	src/nrf_cloud_download.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_REST
	src/nrf_cloud_rest.c)
zephyr_compile_definitions_ifdef(
	CONFIG_NRF_CLOUD_COAP
	CDDL_CBOR_CANONICAL)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_COAP
	coap/src/agnss_encode.c
	coap/src/nrf_cloud_coap_transport.c
	coap/src/coap_codec.c
	coap/src/nrfc_dtls.c
	coap/src/ground_fix_encode.c
	coap/src/ground_fix_decode.c
	coap/src/msg_encode.c
	coap/src/nrf_cloud_coap.c
	coap/src/pgps_decode.c
	coap/src/pgps_encode.c)
zephyr_library_sources_ifdef(
	CONFIG_NRF_CLOUD_CHECK_CREDENTIALS
	src/nrf_cloud_credentials.c)
zephyr_include_directories_ifdef(
	CONFIG_NRF_CLOUD_COAP
	coap/include)
zephyr_include_directories(./include)
